package team.yidong.fenda.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import team.yidong.fenda.entity.Answer;
import team.yidong.fenda.entity.User;


@Repository
public interface PraiseRepository extends JpaRepository<Answer, Integer> {
    @Query("select answer from  Answer answer join answer.praiseUserSet user where user.userOpenId=?1 and answer.id=?2")
    Answer findPraise(String wxNumber, Integer answerId);
}
